
<div id='comments'>
	<!-- BEGIN comments -->
	<div class='comment'>
		{name}:{content}
	</div>
	<hr />
	<!-- END -->

	<div id='comment_form'>
		<table >
			<tr>
				<td>{COMMENT_NAME}</td>
				<td><input type="text" class="inputtext" id='comment_name' /></td>
			</tr>
			<tr>
				<td>{COMMENT_EMAIL}</td>
				<td><input type="text" class="inputtext" id='comment_email' /></td>
			</tr>
					
		</table>
		<textarea id='comment_content' cols="50" rows="5"></textarea>
		<br />
		<input type="button" onclick="comment_submit()" value="{COMMENT_SUBMIT}" />
	</div>
</div>

<script>
function comment_submit()
{
	var data = 
	{
		name: $('#comment_name').val(),
		email:$('#comment_email').val(),
		'item_id':'{item.item_id}',
		content:$('#comment_content').val()
	};
	$.post('?p=ajax&m=new_comment',data,function(s)
	{
		if (s == 'success')
			window.location.reload();
		else
			alert(s);
	});
}
</script>